package Ch7;

public class Calculator2 {

	public double calculate(int a, int b, char oper){
		double result = 0.0;
		if (oper == '+'){
				result = a + b;
		}else if(oper == '-'){
				result = a - b;
		}else if(oper == '*'){
				result = a * b;
		}else {
			result = (double)a/b;
		}
		return result;
	}
}
